<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'editClient_main.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/list_1.css">
	<link rel="stylesheet" type="text/css" href="css/menu_tab.css">
	<link rel="stylesheet" type="text/css" href="css/left_tabmenu.css">
	<link rel="stylesheet" type="text/css" href="css/public.css">
	<script type="text/javascript" src="js/showmenu.js"></script>
	<style type="text/css">
#balancesheet{
padding-top:1;
margin-left:50px;
font-size:12;
}
#asset td{
height:25;
}
#debt td{
height:25;
}
#report_input{
	BORDER-RIGHT: gray 1px solid;
	BORDER-TOP: gray 1px solid;
	BORDER-LEFT: gray 1px solid;
	BORDER-BOTTOM: gray 1px solid;
}
</style>
  </head>


<script type="text/javascript"> 

var isIe = (document.all) ? true : false;
function init(){
    document.onkeydown = function(evt){
        catchKeyDown(evt);
    }
}
function catchKeyDown(evt){
    evt = (evt) ? evt : ((window.event) ? window.event : "");
    var key = isIe ? evt.keyCode : evt.which;
    if (evt.keyCode == 13) {
    	var reg = new RegExp("^[-]?[0-9]*[,]*[0-9]*(.[0-9]{1,3})?$");
    	if(!reg.test(evt.target.value) || evt.target.value == '-'){
			alert("数值格式不准确，请重新输入！");
			evt.target.value = '';
			return;
    	}
        var el = evt.srcElement || evt.target;
        if (el.tagName.toLowerCase() == "input" && el.type != "submit") {
           if (isIe) {
              evt.keyCode = 9;
           } else {
              nextCtl(el).focus();
              evt.preventDefault();
           }
       }
    }
}
function nextCtl(ctl) {
var form = ctl.form;
for (var i = 0; i < form.elements.length - 1; i++) {
   if (ctl == form.elements[i]) {
    return form.elements[i + 1];
   }
}
return ctl;
}
window.onload = init;

</script>
  
  <script>
function submitForm(url) 
{ 
var theform=document.form1; 
theform.action=url; 
theform.method="post";
theform.submit();
} 
</script>
  
<body>
<table width="100%">
<tr><td>
<table width="100%">
<tr><td><jsp:include page="../top.jsp" flush="true"></jsp:include></td></tr>
</table>
</td></tr>
<tr><td height="4"></td></tr>
<tr><td style="padding-left:4px;padding-right:4px;height:20px;text-align:left;">
<div class="text_note" style="background:#BCD2EE;height:18px;">
&nbsp;&nbsp;当前位置： <a href="#" style="text-decoration: none;">首页</a>&gt;&gt;客户管理&gt;&gt;财务报表
</div>
</td></tr>
<tr><td height="2"></td></tr>

<tr>
<td width="85%" style="text-align: left;">
<img src="images/arrow.gif" />
当前客户--客户号：${custInfo.custNo}
&nbsp;&nbsp;&nbsp;客户名称：${custName}
&nbsp;&nbsp;&nbsp;客户类型：${custType}<br><br/><hr></td>
</tr>
<tr>
<td>
<table>
<td td width="85%" style="text-align: left;padding-left:120px;">
<img src="images/arrow.gif" />
当前财报--会计月份：${report.id.accountMonth}
&nbsp;&nbsp;&nbsp;报表口径：${DataDictionary['ReportScope'][report.id.reportScope].itemName}
&nbsp;&nbsp;&nbsp;报表类型：${DataDictionary['ReportKind'][report.reportKind].itemName}
&nbsp;&nbsp;&nbsp;报表币种：${DataDictionary['Currency'][report.reportCurrency].itemName}
</td>
</td>
<td style="text-align: right;padding-right:150px;"><input type="button" class="button" value="返回财报列表" onClick="window.location.href='view/customer/Customer_ReportList.jsp'"></td>
</table>
</td>
</tr>

<tr><td height="2"></td></tr>
<tr>
<td style="vertical-align:top;margin:auto">
<table width="80%" style="margin:auto;border:solid 1px;">
<tr><td>
<div id="tabs">
<ul>
<!-- CSS Tabs -->
<li><a href="customer/saveSmallBalance.do"><span>资产负债表</span></a></li>
<li><a href="customer/saveSmallIncome.do"><span>损益表</span></a></li>
<li  id="current"><a href="customer/saveSmallCashFlow.do"><span>现金流量表</span></a></li>
<li><a href="customer/formVerify.do"><span>报表校验</span></a></li>
</ul>
</div>
</td></tr>
<tr><td>
<form name="form1">
<div style="border:1px #000 solid;">
<br/>
<table width="600"  border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" id="ftable" style="margin:auto;">

	<tr id="list_title">
	<th >项目</th>
	<th>金额（元）<th/>
	</tr>

<c:choose>

<c:when test="${flag==1}">
<c:forEach var="cashFlow" items="${SmallCashFlowDataList}">
	<c:choose>
		<c:when test="${cashFlow.displayFlag == '01' || cashFlow.displayFlag == '11'}">
		<tr bgcolor="#EDECFF">
		<td width="50%" id="text" style="text-align: left;"><font size="2">${cashFlow.displayName}</font></td>
		<td bgcolor="#FFFFFF"><font size="2"><input type="text" name="${cashFlow.reportItemNo}" value="${cashFlow.itemValueString}"  class="input_160"></font></td>
		</tr>
		</c:when>
		
		<c:when test="${cashFlow.displayFlag == '02' || cashFlow.displayFlag == '12'}">
		<tr bgcolor="#FFFFB0">
		<td width="50%"  id="text" style="text-align: right;font-weight:bold;"><font size="2">${cashFlow.displayName}</font></td>
		<td bgcolor="#FFFFFF"><font size="2"><input type="text" name="${cashFlow.reportItemNo}" value="${cashFlow.itemValueString}" class="input_160"></font></td>
		</tr>
		</c:when>
		
		<c:otherwise>
		<tr bgcolor="#FFFFFF">
		<td width="50%"  id="text" style="text-align: left;"><font size="2">${cashFlow.displayName}</font></td>
		<td bgcolor="#FFFFFF"><font size="2"><input type="text" name="${cashFlow.reportItemNo}" value="${cashFlow.itemValueString}" class="input_160"></font></td>
		</tr>
		</c:otherwise>
	</c:choose>
</c:forEach>
</c:when>

<c:otherwise>
<c:forEach var="cashFlow" items="${SmallCashFlowList}">
	<c:choose>
		<c:when test="${cashFlow.displayFlag == '01' || cashFlow.displayFlag == '11'}">
		<tr bgcolor="#EDECFF">
		<td width="50%" id="text" style="text-align: left;font-weight: bold;"><font size="2">${cashFlow.displayName}</font></td>
		<td bgcolor="#FFFFFF"><font size="2"><input type="text" name="${cashFlow.financeItemNo}" class="input_160"></font></td>
		</tr>
		</c:when>
		
		<c:when test="${cashFlow.displayFlag == '02' || cashFlow.displayFlag == '12'}">
		<tr bgcolor="#FFFFB0">
		<td width="50%"  id="text" style="text-align: right;font-weight:bold;"><font size="2">${cashFlow.displayName}</font></td>
		<td bgcolor="#FFFFFF"><font size="2"><input type="text" name="${cashFlow.financeItemNo}" class="input_160"></font></td>
		</tr>
		</c:when>
		
		<c:otherwise>
		<tr bgcolor="#FFFFFF">
		<td width="50%"  id="text" style="text-align: left;"><font size="2">${cashFlow.displayName}</font></td>
		<td bgcolor="#FFFFFF"><font size="2"><input type="text" name="${cashFlow.financeItemNo}" class="input_160"></font></td>
		</tr>
		</c:otherwise>
	</c:choose>
</c:forEach>
</c:otherwise>

</c:choose>
</table>
<br/>
<div align="center">
<table style="margin: auto;width:20%;">
<tr><td id="save"><br></td>
<td height="50"><input type="button" class="button" onClick="submitForm('customer/saveSmallCashFlow.do?type=0')" value="暂存"/></td>
<td height="50"><input type="button" class="button" onClick="submitForm('customer/saveSmallCashFlow.do?type=1')" value="保存"></td>
<td><br></td><td height="50"><input type="reset" class="button" value="取消"></td>
<td id="delete"></td>
</tr></table>
<!--<input type="submit" value="保 存" name="save">&nbsp;&nbsp;&nbsp;<input type="reset" value="取 消" name="reset"></div>-->
</div>
<br/>
   </div>
   </form>

   </td></tr>
   </table>
</td>
</tr>
<tr><td>
<table width="100%">
<tr><td><jsp:include page="../bottom.jsp"></jsp:include></td></tr>
</table>
</td></tr>
</table>
  </body>
</html>
